﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:actb.control="clr-namespace:dragonz.actb.control;assembly=dragonz.actb"
        xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="WpfApplication1.Window1"
        Title="Window1" Height="286" Width="620" mc:Ignorable="d"
    FocusManager.FocusedElement="{Binding ElementName=txtBingSearch}">
    <Window.Resources>
        <LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" StartPoint="0,0" MappingMode="Absolute">
            <GradientStop Color="#ABADB3" Offset="0.05"/>
            <GradientStop Color="#E2E3EA" Offset="0.07"/>
            <GradientStop Color="#E3E9EF" Offset="1"/>
        </LinearGradientBrush>
        <Style x:Key="TextBoxStyle1" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
            <Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="Padding" Value="1"/>
            <Setter Property="AllowDrop" Value="true"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TextBox}">
                        <Microsoft_Windows_Themes:ListBoxChrome x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding IsMouseOver}">
                            <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,0,20,0"/>
                        </Microsoft_Windows_Themes:ListBoxChrome>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                                <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="BingButton" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid Margin="0" x:Name="RootElement">
                            <Rectangle Margin="0,2,4,2" Stroke="#FF000000" StrokeThickness="0" RadiusX="2.5" RadiusY="2.5">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFFCAA24" Offset="0" />
                                        <GradientStop Color="#FFFF860A" Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Ellipse Height="9.584" Margin="0,5.288,7.035,0" VerticalAlignment="Top" Stroke="#FFFFFFFF" StrokeThickness="2" Width="9.584" HorizontalAlignment="Right"/>
                            <Path Height="5.182" HorizontalAlignment="Left" Margin="3.03,0,0,4.364" VerticalAlignment="Bottom" Width="5.096" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FFFFFFFF" StrokeThickness="2" Data="M14.097251,19.182762 L8.7665224,24.552877" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="12" />
            <RowDefinition Height="38" />
            <RowDefinition Height="38" />
            <RowDefinition Height="38" />
            <RowDefinition Height="38" />
            <RowDefinition Height="38" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="12" />
            <ColumnDefinition Width="auto" />
            <ColumnDefinition Width="14" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="20" />
        </Grid.ColumnDefinitions>
        <Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Target="{Binding ElementName=txtBingSearch}">_Bing Search:</Label>
        <Grid Grid.Column="3" Grid.Row="1">
            <TextBox HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="27" Style="{DynamicResource TextBoxStyle1}" Name="txtBingSearch" TabIndex="0"/>
            <Button x:Name="btnBingSearch" Cursor="Hand" Width="22" Height="22" HorizontalAlignment="Right" BorderThickness="0" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" Padding="1" Style="{DynamicResource BingButton}"/>
        </Grid>
        <Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Content="UR_L History:" Target="{Binding ElementName=txtUrlHistory}"/>
        <TextBox x:Name="txtUrlHistory" ToolTip="Type 'H' to see autocompletion effect" Grid.Column="3" VerticalAlignment="Center"  Grid.Row="2" />
        <Label VerticalAlignment="Center" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" Content="_Registry Path:" Target="{Binding ElementName=txtRegistryPath}"/>
        <TextBox x:Name="txtRegistryPath" ToolTip="Type 'H' to see autocompletion effect" Grid.Column="3" VerticalAlignment="Center"  Grid.Row="3" />
        <Label VerticalAlignment="Center" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" Content="_US States:" Target="{Binding ElementName=accbStates}"/>
        <actb.control:AutoCompleteComboBox Grid.Column="3" Grid.Row="4" VerticalAlignment="Center" x:Name="accbStates"/>
        <Label VerticalAlignment="Center" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Right" Content="_FileSys Path:" Target="{Binding ElementName=actbFileSysPath}"/>
        <actb.control:AutoCompleteTextBox x:Name="actbFileSysPath" Grid.Column="3" Grid.Row="5" VerticalAlignment="Center" />
        <StackPanel Grid.Column="3" Grid.Row="6" VerticalAlignment="Top" HorizontalAlignment="Left" Orientation="Horizontal">
            <CheckBox x:Name="chkIncludeFiles" Click="ChkIncludeFiles_Click" Content="_Include Files"/>
            <CheckBox x:Name="chkAutoAppend" Click="ChkAutoAppend_Click" Content="Auto _Append" Margin="10 0 0 0"/>
        </StackPanel>
    </Grid>
</Window>